<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0"
    />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
    <script src="https://cdn.bootcss.com/vue/2.6.11/vue.min.js"></script>
  </head>
  <body>
    <div id="root">
      <h2>今天天气炎热</h2>
      <input type="text" v-model="message" @input="change($event)" />
      <p>{{message}}</p>
    </div>
    <script>
      Vue.config.productionTip = false; //组织vue在启动是生成生产提示
      let vm = new Vue({
        el: "#root",
        // 属性数据
        data: {
          message: "",
        },
        // 计算
        computed: {},
        // 方法
        methods: {
          change(e) {
            console.log(e.target.value);
          },
        },
        // 监视
        watch: {},
      });
    </script>
  </body>
</html>
